#pragma once

#include "../QRSWidgetBase.h"
#include "ui_HollowOperationWidget.h"

#include "Render/QIVtkSelectionPipeline.h"
#include <TopoDS_Face.hxx>

QT_BEGIN_NAMESPACE
namespace Ui { class HollowOperationWidgetClass; };
QT_END_NAMESPACE

class MainWindow;
class ShapeOperation;

class HollowOperationWidget : public QRSWidgetBase
{
	Q_OBJECT

public:
	HollowOperationWidget(MainWindow* inMainWindow, ShapeOperation* inOperation = nullptr, QWidget* parent = nullptr);
	~HollowOperationWidget();
protected:
	void closeEvent(QCloseEvent* event) override;
	void OnSelectedSubShapes(QIVtkSelectionPipeline* actor);
	void OnModify();
	void OnConfirm();
private:
	Ui::HollowOperationWidgetClass *ui;
protected:
	std::vector<std::reference_wrapper<const TopoDS_Shape>> m_shapelist;
	Handle(QIVtkSelectionPipeline) m_selectedActor;
	Handle(QIVtkSelectionPipeline) cacheActor;
	std::vector<TopoDS_Face> facesToRemoveCache;
	float _thickness = 0;
};
